/**
 * 
 */

var VALIDATE = (function($, VALIDATE){
	
	//首页(index)：登录
	VALIDATE.login = {
		rules : {
			userName : "required",
			password : {
				required : true,
				minlength : 6,
				maxlength : 16
			}
		},
		messages : {
			userName : "请输入姓名",
			password : {
				required : "请输入密码",
				minlength : $.format("密码不能小于{0}个字符"),
				maxlength : $.format("密码不能大于{0}个字符")
			}
		}
	};
	
	//全局：修改密码
	VALIDATE.updatePass = {
		rules : {
			originalPass : "required",
			newPass : {
				required : true,
				minlength : 6,
				maxlength : 16
			},
			confirmPass : {
				required : true,
				equalTo : "#newPass"
			}
		},
		messages : {
			originalPass : "请输入原密码",
			newPass : {
				required : "请输入新密码",
				minlength : $.format("密码不能小于{0}个字符"),
				maxlength : $.format("密码不能大于{0}个字符")
			},
			confirmPass : {
				required : "请确认新密码"
			}
		}
	}
	
	VALIDATE.dataStatics = {
		rules : {
			activeName : {
				required : true,
				maxlength: 10
			}
		},
		messages : {
			activeName : {
				required : '请输入活动名称',
				maxlength: '最高10个字符'
			}
		}
	}
	
	return VALIDATE;
	
})(jQuery, {});






